<template>
  <div class="publish-container"  :style="this.$route.query.type?'width: 80%':''">
    <Tabs id="publish-tab" :value="activeTab">
      <TabPane label="发布商品" name="goods">
        <publish-goods></publish-goods>
      </TabPane>
      <TabPane label="发布拍卖品" name="bid">
        <publish-bid></publish-bid>
      </TabPane>
      <TabPane label="发布帖子" name="blog">
        <publish-blog></publish-blog>
      </TabPane>
    </Tabs>
  </div>
</template>

<script>
import PublishGoods from "../components/Publish_Goods.vue";
import PublishBid from "../components/Publish_Bid";
import PublishBlog from "../components/Publish_Blog";

export default {
  name: "publish",
  components: {
    PublishGoods,
    PublishBid,
    PublishBlog
  },
  computed: {
    activeTab() {
      switch (this.$route.query.type) {
        case "blog_edit":
          return "blog";
        case "bid_edit":
          return "bid";
        default:
          return "goods"
      }
    }
  }
};
</script>
